package com.han.state.after;

/**
 * @ClassName ClosingState
 * @Description 电梯关门状态类
 * @Author duoduo Han
 * @Date 2024/6/16 12:30
 */
public class ClosingState extends LiftState{
    @Override
    public void open() {
        //改变状态
        super.context.setLiftState(Context.OPENING_STATE);
        super.context.open();
    }

    @Override
    public void close() {
        System.out.println("电梯关门...");

    }

    @Override
    public void run() {
        //改变电梯状态
        super.context.setLiftState(Context.RUNNING_STATE);
        super.context.run();
    }

    @Override
    public void stop() {
        //什么都不做

    }
}
